Integrand size = 38, antiderivative size = 81 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\frac {2 a^2 (7 A+3 B) c^3 \cos ^5(e+f x)}{35 f (c-c \sin (e+f x))^{5/2}}-\frac {2 a^2 B c^2 \cos ^5(e+f x)}{7 f (c-c \sin (e+f x))^{3/2}} \]
2/35*a^2*(7*A+3*B)*c^3*cos(f*x+e)^5/f/(c-c*sin(f*x+e))^(5/2)-2/7*a^2*B*c^2 *cos(f*x+e)^5/f/(c-c*sin(f*x+e))^(3/2)
Time = 0.82 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.10 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\frac {2 a^2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^5 (7 A-2 B+5 B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{35 f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )} \]
(2*a^2*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^5*(7*A - 2*B + 5*B*Sin[e + f* x])*Sqrt[c - c*Sin[e + f*x]])/(35*f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2]))
Time = 0.61 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.95, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3446, 3042, 3335, 3042, 3152}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sin (e+f x)+a)^2 \sqrt {c-c \sin (e+f x)} (A+B \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^2 \sqrt {c-c \sin (e+f x)} (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle a^2 c^2 \int \frac {\cos ^4(e+f x) (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{3/2}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \int \frac {\cos (e+f x)^4 (A+B \sin (e+f x))}{(c-c \sin (e+f x))^{3/2}}dx\) |
\(\Big \downarrow \) 3335 |
\(\displaystyle a^2 c^2 \left (\frac {1}{7} (7 A+3 B) \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^{3/2}}dx-\frac {2 B \cos ^5(e+f x)}{7 f (c-c \sin (e+f x))^{3/2}}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \left (\frac {1}{7} (7 A+3 B) \int \frac {\cos (e+f x)^4}{(c-c \sin (e+f x))^{3/2}}dx-\frac {2 B \cos ^5(e+f x)}{7 f (c-c \sin (e+f x))^{3/2}}\right )\) |
\(\Big \downarrow \) 3152 |
\(\displaystyle a^2 c^2 \left (\frac {2 c (7 A+3 B) \cos ^5(e+f x)}{35 f (c-c \sin (e+f x))^{5/2}}-\frac {2 B \cos ^5(e+f x)}{7 f (c-c \sin (e+f x))^{3/2}}\right )\) |
a^2*c^2*((2*(7*A + 3*B)*c*Cos[e + f*x]^5)/(35*f*(c - c*Sin[e + f*x])^(5/2) ) - (2*B*Cos[e + f*x]^5)/(7*f*(c - c*Sin[e + f*x])^(3/2)))
3.1.92.3.1 Defintions of rubi rules used
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[b*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x ])^(m - 1)/(f*g*(m - 1))), x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && EqQ[2*m + p - 1, 0] && NeQ[m, 1]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)* (g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x] + S imp[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[ a^2 - b^2, 0] && IGtQ[Simplify[(2*m + p + 1)/2], 0] && NeQ[m + p + 1, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin [e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a* d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Time = 1.37 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.80
method | result | size |
default | \(-\frac {2 \left (\sin \left (f x +e \right )-1\right ) c \left (1+\sin \left (f x +e \right )\right )^{3} a^{2} \left (5 B \sin \left (f x +e \right )+7 A -2 B \right )}{35 \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(65\) |
parts | \(-\frac {2 A \,a^{2} \left (\sin \left (f x +e \right )-1\right ) \left (1+\sin \left (f x +e \right )\right ) c}{\cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {2 B \,a^{2} \left (\sin \left (f x +e \right )-1\right ) c \left (1+\sin \left (f x +e \right )\right ) \left (5 \left (\sin ^{3}\left (f x +e \right )\right )-6 \left (\sin ^{2}\left (f x +e \right )\right )+8 \sin \left (f x +e \right )-16\right )}{35 \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {2 a^{2} \left (A +2 B \right ) \left (\sin \left (f x +e \right )-1\right ) c \left (1+\sin \left (f x +e \right )\right ) \left (3 \left (\sin ^{2}\left (f x +e \right )\right )-4 \sin \left (f x +e \right )+8\right )}{15 \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {2 a^{2} \left (2 A +B \right ) \left (\sin \left (f x +e \right )-1\right ) c \left (1+\sin \left (f x +e \right )\right ) \left (\sin \left (f x +e \right )-2\right )}{3 \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(256\) |
-2/35*(sin(f*x+e)-1)*c*(1+sin(f*x+e))^3*a^2*(5*B*sin(f*x+e)+7*A-2*B)/cos(f *x+e)/(c-c*sin(f*x+e))^(1/2)/f
Leaf count of result is larger than twice the leaf count of optimal. 193 vs. \(2 (73) = 146\).
Time = 0.27 (sec) , antiderivative size = 193, normalized size of antiderivative = 2.38 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\frac {2 \, {\left (5 \, B a^{2} \cos \left (f x + e\right )^{4} - {\left (7 \, A + 8 \, B\right )} a^{2} \cos \left (f x + e\right )^{3} - {\left (21 \, A + 19 \, B\right )} a^{2} \cos \left (f x + e\right )^{2} + 2 \, {\left (7 \, A + 3 \, B\right )} a^{2} \cos \left (f x + e\right ) + 4 \, {\left (7 \, A + 3 \, B\right )} a^{2} - {\left (5 \, B a^{2} \cos \left (f x + e\right )^{3} + {\left (7 \, A + 13 \, B\right )} a^{2} \cos \left (f x + e\right )^{2} - 2 \, {\left (7 \, A + 3 \, B\right )} a^{2} \cos \left (f x + e\right ) - 4 \, {\left (7 \, A + 3 \, B\right )} a^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{35 \, {\left (f \cos \left (f x + e\right ) - f \sin \left (f x + e\right ) + f\right )}} \]
2/35*(5*B*a^2*cos(f*x + e)^4 - (7*A + 8*B)*a^2*cos(f*x + e)^3 - (21*A + 19 *B)*a^2*cos(f*x + e)^2 + 2*(7*A + 3*B)*a^2*cos(f*x + e) + 4*(7*A + 3*B)*a^ 2 - (5*B*a^2*cos(f*x + e)^3 + (7*A + 13*B)*a^2*cos(f*x + e)^2 - 2*(7*A + 3 *B)*a^2*cos(f*x + e) - 4*(7*A + 3*B)*a^2)*sin(f*x + e))*sqrt(-c*sin(f*x + e) + c)/(f*cos(f*x + e) - f*sin(f*x + e) + f)
\[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=a^{2} \left (\int A \sqrt {- c \sin {\left (e + f x \right )} + c}\, dx + \int 2 A \sqrt {- c \sin {\left (e + f x \right )} + c} \sin {\left (e + f x \right )}\, dx + \int A \sqrt {- c \sin {\left (e + f x \right )} + c} \sin ^{2}{\left (e + f x \right )}\, dx + \int B \sqrt {- c \sin {\left (e + f x \right )} + c} \sin {\left (e + f x \right )}\, dx + \int 2 B \sqrt {- c \sin {\left (e + f x \right )} + c} \sin ^{2}{\left (e + f x \right )}\, dx + \int B \sqrt {- c \sin {\left (e + f x \right )} + c} \sin ^{3}{\left (e + f x \right )}\, dx\right ) \]
a**2*(Integral(A*sqrt(-c*sin(e + f*x) + c), x) + Integral(2*A*sqrt(-c*sin( e + f*x) + c)*sin(e + f*x), x) + Integral(A*sqrt(-c*sin(e + f*x) + c)*sin( e + f*x)**2, x) + Integral(B*sqrt(-c*sin(e + f*x) + c)*sin(e + f*x), x) + Integral(2*B*sqrt(-c*sin(e + f*x) + c)*sin(e + f*x)**2, x) + Integral(B*sq rt(-c*sin(e + f*x) + c)*sin(e + f*x)**3, x))
\[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} {\left (a \sin \left (f x + e\right ) + a\right )}^{2} \sqrt {-c \sin \left (f x + e\right ) + c} \,d x } \]
Leaf count of result is larger than twice the leaf count of optimal. 200 vs. \(2 (73) = 146\).
Time = 0.54 (sec) , antiderivative size = 200, normalized size of antiderivative = 2.47 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=-\frac {\sqrt {2} {\left (5 \, B a^{2} \cos \left (-\frac {7}{4} \, \pi + \frac {7}{2} \, f x + \frac {7}{2} \, e\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 35 \, {\left (4 \, A a^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + B a^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 35 \, {\left (2 \, A a^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + B a^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \cos \left (-\frac {3}{4} \, \pi + \frac {3}{2} \, f x + \frac {3}{2} \, e\right ) + 7 \, {\left (2 \, A a^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, B a^{2} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \cos \left (-\frac {5}{4} \, \pi + \frac {5}{2} \, f x + \frac {5}{2} \, e\right )\right )} \sqrt {c}}{140 \, f} \]
-1/140*sqrt(2)*(5*B*a^2*cos(-7/4*pi + 7/2*f*x + 7/2*e)*sgn(sin(-1/4*pi + 1 /2*f*x + 1/2*e)) + 35*(4*A*a^2*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)) + B*a^2 *sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)))*cos(-1/4*pi + 1/2*f*x + 1/2*e) + 35* (2*A*a^2*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)) + B*a^2*sgn(sin(-1/4*pi + 1/2 *f*x + 1/2*e)))*cos(-3/4*pi + 3/2*f*x + 3/2*e) + 7*(2*A*a^2*sgn(sin(-1/4*p i + 1/2*f*x + 1/2*e)) + 3*B*a^2*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)))*cos(- 5/4*pi + 5/2*f*x + 5/2*e))*sqrt(c)/f
Timed out. \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\int \left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2\,\sqrt {c-c\,\sin \left (e+f\,x\right )} \,d x \]